import React, {useEffect, useState} from 'react';
import {View,} from '@tarojs/components';


import styles from './index.module.scss';
import {Arrow} from "@taroify/icons";
import {Popup} from "@taroify/core";
import BuyPopup from "@/mall/pages/good/BuyPopup";

const Index: React.FC = () => {

    const [showBuyPopup, setShowBuyPopup] = useState(false)
    useEffect(() => {
        load();
    }, []);

    const load = async () => {

    }

    return (
        <>
            <View className={styles.page} onClick={() => setShowBuyPopup(true)}>

                <View className={styles.page_left}>
                    <View className={styles.page_left_left}>
                        已选
                    </View>
                    <View className={styles.page_left_right}>
                        1 件 ，白色 ，L
                    </View>
                </View>
                <View className={styles.page_right}>
                    <Arrow size={12}/>
                </View>
            </View>
            <Popup
                rounded lock placement='bottom'
                onClose={async () => {
                    setShowBuyPopup(false)
                }} open={showBuyPopup}
            >
                <Popup.Close></Popup.Close>
                <BuyPopup></BuyPopup>
            </Popup>
        </>
    );
};

export default Index;
